<template>
      <Swiper>
      <SwiperItem v-for="item in banners" :key="item.acm">
        <a :href="item.link">
          <img :src="item.image" alt="" @load="imgload">
        </a>
      </SwiperItem>
    </Swiper>
</template>

<script>
import {Swiper,SwiperItem} from 'components/common/swiper'
export default {
  name:'HomeSwiper',
  props: {
    banners: {
      type: Array,
      default() {
        return [];
      }
    }
  },
  components: {
    Swiper,
    SwiperItem
  },
  data() {
    return {
      isLoad: true
    }
  },
  methods: {
    imgload() {
      if(this.isLoad) {
        this.isLoad = false;
        this.$emit('swiperImgLoad');
      }
    }
  }
}
</script>

<style>

</style>